package com.gxa.zhonglong.common;

/**
 * 异常状态编码和信息枚举
 * @author NITRO
 */

public enum ExceptionCode {
    //枚举就是类型，其中值是先声明好的
    SERVER("50000","服务器开小差了，请稍后再试"),
    LOGIN_FAILED("50001","登录失败，请检查用户名或密码是否正确"),
    DUPLICATE_USERNAME("50002","该名称已存在,请换一个"),
    ADD_DEFEATED("50003","添加失败"),
    DELETE_DEFEATED("50004","没有该用户"),
    NODATA("50005","没有数据"),
    BAD_PHONE("50006","手机号不合法"),
    SMS_SMS_FALSE("50007","短信发送失败，请稍后再试"),
    PHONE_ISUSED("50008","注册失败，手机号已被使用，请更换手机号"),
    CAPTCHA_FALSE("50009","验证码不正确"),
    WRONG("50010","没有权限"),
    LOGIN_FALSE("50011","登录失败，请重新输入"),
    NOT_NULL("50012","不能为空"),
    GET_FALSE("50013","领取失败，每个用户只能领取一次相同类型优惠券"),
    UPDATE_FALSE("50014","修改失败"),
    DELETE_FALSE("50015","删除失败"),
    DUPLICATE_ROlE_NAME("50016","角色已存在" ),
    DUPLICATE_CUSTOMER("50017","客户已存在,请勿重复添加" ),
    NO_CUSTOMER("50018","客户不存在" ),
    DUPLICATE_DISCOUNT("50019","折扣已存在,请勿重复添加" ),
    NO_DISCOUNT("50020","折扣不存在" ),
    NO_STORAGE("50021","库存不存在" ),
    NO_VIPCARD("50022","会员卡不存在" ),
    DUPLICATE_VIPCARD("50023","会员卡已存在,请勿重复添加" );



    private String code;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ExceptionCode(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
